home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Tools (InfoMagic)
/
Internet Tools.iso
/
dos_win
/
winsock
/
hacklist
/
94-04.Z
/
94-04
/
000014_bruce@isi.FrontierTech.COM_Mon Apr 18 02:38:09 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1994-04-30
|
2KB
Received: from isi.FrontierTech.COM by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
id AA15970; Mon, 18 Apr 1994 09:37:54 -0400
Received: from bruces.FrontierTech.COM by isi.FrontierTech.COM (5.65/1.40)
id AA07274; Mon, 18 Apr 94 08:37:18 -0500
X-Mailer: SuperTCP/NFS for Windows Version 4.00 (Mailer Version 1.02)
Message-Id: <2DB29B55-00000001@Bruces.FrontierTech.COM>
From: Bruce@isi.FrontierTech.COM
Date: Mon, 18 Apr 94 08:38:09 CST
Subject: Re: Curious behaviour from winsock
To: winsock-hackers@sunsite.unc.edu
Mime-Version: 1.0
Content-Type: Text/Plain; Charset=US-ASCII
Bob Quin writes:
>
>I agree with your suggested method for the most robust way to
>close a socket; that's what we recommend also. But it's certainly
>reasonable to call closesocket() and expect an FD_CLOSE when the
>graceful close completes (e.g. FIN response received, so TIME_WAIT
>state entered) or the graceful close attempt times out.
>
>For example, assuming your application initiated the close (called
>closesocket() first), then you'd be in FIN_WAIT. On page 91 in the
>documentation for WSAAsyncSelect() the spec says "The FD_CLOSE is
>posted when the connection goes into FIN_WAIT or CLOSE_WAIT states."
>
That same documentation says "Closing a socket with closesocket() also
cancels WSAAsyncSelect() message sending" (p. 89). I've always felt that
once closesocket() is called, the descriptor is invalid, and a DLL
shouldn't post messages containing invalid descriptors.
The FD_CLOSE would be redundant, anyway, wouldn't it? It was the
application that initiated the close, so it should already know about it,
right?
****************************************
Bruce A Backman (Bruce@FrontierTech.COM)
Frontier Technologies Corporation
10201 North Port Washington Road
Mequon, WI 53092
****************************************